import 'package:decimal/decimal.dart';

extension DecimalExt on Decimal {

  String fractionalPart(int fractionDigits) {
    final fractionalPart = this % Decimal.one;
    if (fractionalPart == Decimal.zero) {
      return '';
    } else {
      return fractionalPart
          .toString()
          .replaceFirst('0.', '');
    }
  }
}